/*
 *         Copyright (c) KUBOTA Corporation and HUDSON SOFT,
 *                  1994, 1995 All Rights Reserved
 *
 *  This software comprises unpublished confidential information of
 *  KUBOTA Corp. and HUDSON SOFT. It may not be used, copied or made 
 *  available to anyone, except in accordance with the license under
 *  which it is furnished.
 */
static char SccsId[] = "@(#)acrotx.c	1.5	9/19/95";
#include <farl.h>
#include <agl.h>

/*
 * カメラＸ軸回転
 */
void
AGLRotateCameraX(int angle)
{
     /* 範囲外と０度の場合は 0 にする == 回転させない */
     if (angle >= AGLTFuncSize || angle <= 0) return;

     /* camMatrix187を回転させる */
     if (__AGLCamera.camChanged == -2) {
	  FarlGetRotateX4x4M187((AGLTFuncSize - angle),
	  		(unsigned short*)__AGLCamera.camMatrix187);
     } else {
	  FarlSetSrcMatrix((unsigned short*)__AGLCamera.camMatrix187);
	 FarlRotateX4x4M187(AGLTFuncSize - angle);
	 FarlCopyDstToMem4x4((unsigned short*)__AGLCamera.camMatrix187);
     }

     /* camMatrix1015を回転させる */
     if (__AGLCamera.camChanged < 0) {
	  FarlGetRotateX3x3M1015((AGLTFuncSize - angle),
	  		(unsigned short*)__AGLCamera.camMatrix1015);
     } else {
	  FarlSetSrcMatrix3x3((unsigned short*)__AGLCamera.camMatrix1015);
	 FarlRotateX3x3M1015(AGLTFuncSize - angle);
	 FarlCopyDstToMem3x3((unsigned short*)__AGLCamera.camMatrix1015);
     }
     __AGLCamera.camChanged = 1;
}
